<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>RegExp</title>
    <script type="text/javascript">
        var reg = /^\w+@[0-9A-z]+\.([A-z]{2,5}){1,2}$/;
        alert(reg.test("@qq."));
    </script>
</head>
<body>

</body>
</html>